<%- include header %>
<div class="container">
    <h3 id="title"><%= post.name %>的日记</h3>
    <hr style="width: 90%;"/>
<p>
    <% if( user && user.name == post.name ){ %>
    <span>
        <a class="label label-success" href="/edit/<%= post.name %>/<%= post.time.minute %>/<%= post.title %>">编辑</a>
    </span>
    <span>
        <a class="label label-danger" href="/remove/<%= post.name %>/<%= post.time.minute %>/<%= post.title %>">删除</a>
    </span>
    <% } %>
</p>
<p class="info">
    作者：<a href="/u/<%= post.name %>"><%= post.name %></a> |
    [<%= post.time.minute %>] |
    [<% post.tags.forEach(function (tag, index) { %>
    <% if (tag) { %>
    <a class="tag" href="/tags/<%= tag %>"><%= tag %></a>
    <% } %>
    <% }) %>]
</p>
<div class="p">
    <p><%- post.post %></p>
</div>
<p class="info">阅读：<%= post.pv %> | 评论：<%= post.comments.length %></p>
<% include comment %>
<%- include footer %>